<HTML><HEAD><TITLE>EplexInstance: eplex_add_constraints(+Constraints,+Integers)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(eplex)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>EplexInstance: eplex_add_constraints(+Constraints,+Integers)</H1>
Add new constraints to the eplex instance EplexInstance, possibly triggering it.
<DL>
<DT><EM>Constraints</EM></DT>
<DD>A (possibly empty) list of equality or inequality constraints
</DD>
<DT><EM>Integers</EM></DT>
<DD>A (possibly empty) list of variables to be considered as integers
</DD>
</DL>
<H2>Description</H2>
<P>
  Add new constraints (with possibly new variables) to the eplex instance
  EplexInstance.  Cstrs is a list of equality or inequality constraints; 
  NewIntegers is a list of (possibly new) variables that should be
  consider as integers  This is logically the same as posting the
  constraints one by one to the solver, but it may be more convenient if 
  the constraints are already collected as a list.
</P><P>
  Operationally, if a solver state has been associated with the eplex
  instance, the constraints are added to the solver state in one go. 
  For some solvers, this can be more efficient than adding the constraints
  incrementally. 
</P><P>
  If the new_constraint trigger option was selected, then the solver will
  be invoked after the adding of the constraints if these constraints are 
  not already satisfied.  The constraints will be removed on backtracking.
</P><P>
  The constraints are normalised and simplified before being passed to
  the external solver. If any constraint is ground, they are tested for
  consistency.
</P><P>
  Note that variables in NewIntegers can be any problem variables. In
  previous versions of ECLiPSe, there was a restriction that the variables
  be new problem variables; this restriction has been removed.
</P><P>

 </P>
<H3>Fail Conditions</H3>
Any ground (no variable) or bound constraints (one variable) is self-inconsistent.
<H3>Resatisfiable</H3>
no
<H3>Exceptions</H3>
<DL>
<DT><EM>(4) instantiation fault </EM>
<DD>Constraints or Integers uninstantiated.
<DT><EM>(5) type error </EM>
<DD>Some constraint in Constraints is non-linear.
<DT><EM>(40) stale object handle </EM>
<DD>Solver state had been previously destroyed.
</DL>
<H2>See Also</H2>
<A HREF="../../lib/eplex/lp_add_constraints-3.html">lp_add_constraints / 3</A>, <A HREF="../../lib/eplex/lp_demon_setup-5.html">lp_demon_setup / 5</A>, <A HREF="../../lib/eplex/lp_add-3.html">lp_add / 3</A>, <A HREF="../../lib/eplex/lp_add_constraints-4.html">lp_add_constraints / 4</A>, <A HREF="../../lib/eplex/SE-2.html">$= / 2</A>, <A HREF="../../lib/eplex/SEL-2.html">$=< / 2</A>, <A HREF="../../lib/eplex/SGE-2.html">$>= / 2</A>, <A HREF="../../lib/eplex/ENE-2.html">=:= / 2</A>, <A HREF="../../lib/eplex/EL-2.html">=< / 2</A>, <A HREF="../../lib/eplex/GE-2.html">>= / 2</A>
</BODY></HTML>
